class Base {
    public int a = 1;
    public int b = 2;

    public void test() {
        System.out.println("Base::test()");
    }

}

class A {

}

class Derived extends Base {
    public int a = 10;
    public int c = 3;

    public void test() {
        System.out.println("Derived::test()");
    }

    public void test2() {
        System.out.println("Derived::test2()");
    }
    public void test(int a) {
        System.out.println(a);
    }

    public  void method() {
        //优先访问子类的  子类没有 访问父类的
//        test2();
//        super.test();
//        test(10);

        System.out.println(super.a);
        System.out.println(this.a);
        System.out.println(this.b);
    }
}
public class test2 {
    public static void main(String[] args) {
        Derived derived = new Derived();
        derived.method();
    }
}
